In recent times, use of blockchain technology has expanded beyond crypto currency, to provide a framework for the execution of smart contracts. Smart contracts are self-executing agreements between parties that have all the terms & conditions written in code, and execute automatically, depending on future signatures or trigger events. By leveraging blockchain technologies, smart contracts, once appended to the blockchain, cannot be revoked, denied, or reversed. A smart contract usually provides multiple functions which can be executed by simply invoking a call method on the blockchain to which the said smart contract is appended to. As more and more blockchains with varied processing and execution speed continue to emerge, multiple smart contracts with various functionalities are being written. However, usage of smart contract functionality is limited to the blockchain hosting the said smart contract. A user associated with one blockchain is unable to use functionalities of a smart contract on another blockchain, due to different structure and language of smart contracts prevalent across different blockchains. Further, some of the blockchains have higher execution speed resulting in faster execution of algorithms embedded inside a smart contract appended thereto and such algorithms/methods are not accessible to a user on a different blockchain. This limits the benefits arising out of smart contracts and hinders interoperability of blockchains.
One of the commonly used methods for executing a smart contract method, from another blockchain, on a subject blockchain is to copy the said smart contract code onto a third part processing platform, rewrite the code in a language and structure acceptable to subject blockchain and add the same to the subject blockchain. Optionally, users may register on the other blockchain and use the smart contract functionality directly on the other blockchain.
The abovementioned method of reusing smart contract from other blockchain results in unnecessary wastage of resources, time and manpower in rewriting the whole smart contract. Further, different blockchains have different functionality support, algorithms and execution speed and hence smart contracts codes, from other blockchains, cannot be rewritten and/or copied onto them. Moreover, such rewriting of smart contract codes doesn't allow real time execution of smart contracts.
In light of the above-mentioned shortcomings associated with existing methods and systems for reusing smart contracts across blockchains in near real-time, it is highly desirable to have a system and method that allows real-time reusability of smart contracts across blockchains. The present invention, as described below, allows interoperability amongst blockchains by enabling use of smart contracts across different blockchains without the need of rewriting the smart contract codes from one blockchain to another blockchain.